package com.lemon.cloud.gateway.config;

import com.google.common.collect.Lists;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import java.util.ArrayList;
import java.util.List;

/**
 * 网关配置文件
 */
@Data
@RefreshScope
@ConfigurationProperties("gateway")
public class GatewayConfigProperties {

    /**
     * 网关解密登录前端密码 秘钥
     */
    private String encodeKey;

    /**
     * 网关需要校验验证码的客户端
     * - mobile_code
     */
    private List<String> checkCodeGrantTypes = Lists.newArrayList();

    /**
     * 是否开启xss防御,默认开启
     */
    private Boolean xssEnable = true;

    /**
     * 网关不需要xss过滤的url，默认全部都会拦截过滤
     */
    private List<String> excludeXssPatterns = new ArrayList<>();
}
